﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace GarmentKingProto
{
    public partial class frmLogin : Form
    {
        public static string type;

        public frmLogin()
        {
            InitializeComponent();
        }

        private void button2_Click(object sender, EventArgs e)
        {
            Application.Exit();
        }

        private void button1_Click(object sender, EventArgs e)
        {
            if (textBoxUser.Text == "admin_WB" && textBoxPwd.Text == "white")
            {
                type = "WB";
                this.Hide();
                frmAdmin frm = new frmAdmin("WB");
                frm.Show();
            }
            else if (textBoxUser.Text == "admin_DC" && textBoxPwd.Text == "denim")
            {
                type = "DC";
                this.Hide();
                frmAdminDC frm = new frmAdminDC("DC");
                frm.Show();
            }
            else
                MessageBox.Show("Bad Credentials");

            textBoxUser.Text = "";
            textBoxPwd.Text = "";
            textBoxUser.Focus();
        }

        internal static void loginShow()
        {
            //Used 2 show the Login Form
            frmLogin frm = new frmLogin();
            frm.Show();
        }
    }
}
